{% load static %}
<!DOCTYPE html>
<html>
<head>
    <link type="text/css" rel="stylesheet" href="{% static 'ninja/swagger-ui.3.51.2.css' %}">
    <link rel="shortcut icon" href="{% static 'ninja/favicon.png' %}">
    <title>{{ api.title }}</title>
</head>
<body>
    <div id="swagger-ui">
    </div>

    <script src="{% static 'ninja/swagger-ui-bundle.3.51.2.js' %}"></script>
    <script>
        const ui = SwaggerUIBundle({
            url: '{{ openapi_json_url }}',
            dom_id: '#swagger-ui',
            presets: [
            SwaggerUIBundle.presets.apis,
            SwaggerUIBundle.SwaggerUIStandalonePreset
            ],
            layout: "BaseLayout",
        {% if api.csrf and csrf_token %}
            requestInterceptor: (req) => {
				req.headers['X-CSRFToken'] = "{{csrf_token}}"
				return req;
			},
        {% endif %}
            deepLinking: true
        })
    </script>
</body>
</html>
